package sample.mybatis.web;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import sample.mybatis.domain.User;
import sample.mybatis.dto.Routes;


/**
 * login controller
 * @author liujian
 */
@SpringBootApplication
@Controller
@RequestMapping(value = Routes.VERSION)
public class LoginController {

	
	
	@RequestMapping(value = Routes.GET + Routes.USER,method = {RequestMethod.POST,RequestMethod.GET})
	public String login(@RequestParam("name")String userName,@RequestParam("pwd") String password){
		
		User user = new User();
		user.setUsername(userName);
		user.setPassword(password);
		
		return "/user/index";
	}
	
	
}
